<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>	
<link rel="stylesheet" href="${initParam.root}/css/board.css" type="text/css">

<script type="text/javascript">
	$(document).ready(function(){
		$("#QnaWriteImg").click(function(){
			if($("#qnaTitle").val()==""){
				alert("제목을 입력하세요!");
				return;
			}else if($("#qnaWriter").val()==""){
				alert("작성자 이름을 입력하세요!");
				return;
			}else if($("#qnaContent").val()==""){
				alert("본문 내용을 입력하세요!");
				return;
			}
			$("#qnaWriteForm").submit();
		});
	});
</script>
<div id="mainCss">
	<form action="${initParam.root }qna/qnaWrite.moja" method="post" id="qnaWriteForm"  >
 <table class="inputForm" >

    <tbody>
	 <tr>
		<td>제목</td>
		<td><input type="text" name="qnaTitle" id="qnaTitle"></td>
	 </tr>
	 <tr>
		<td>이름</td>
		<td><input type="text" name="qnaWriter" id="qnaWriter"></td>
	 </tr>
	
	 <tr>
		<td colspan=2><textarea cols="32" rows="10" name="qnaContent" id="qnaContent"></textarea></td>
	 </tr>
	 <tr>
	 	<td  colspan=2 >
	 		<img id="QnaWriteImg" src="${initParam.root}/img/write_btn.jpg"  />	 		
	 	</td>
	 </tr>
	 </tbody>
 </table> 
 </form>
</div>
